import random
import datetime

#随机整数
print(random.randint(0, 100),"\n")

#当前秒级日期时间➡时间戳
nowtime = datetime.datetime.now().replace(microsecond=0)
print(nowtime)
timer = datetime.datetime.timestamp(nowtime)
print("%d\n"%timer)

#随机时间戳➡秒级日期时间
randomtimer = random.randint(0, 2**32)
print(randomtimer)
randomdate = datetime.datetime.fromtimestamp(randomtimer)
print(randomdate)